/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bgu.dcr.tp;

import bgu.dcr.tp.cfg.MarkProperty;
import bgu.dcr.tp.cfg.MarkSocket;
import bgu.dcr.tp.cfg.Register;
import bgu.dcr.tp.cfg.SocketType;
import java.util.List;

/**
 *
 * @author Shl
 */
@Register("car-spawner")
public class CarSpawner {

    int numberOfCars;
    List<String> carColor;
    CarSpeedProvider speedProvider;

    @MarkSocket(mandatory = true, type = SocketType.COLLECTION)
    public List<String> getCarColor() {
        return carColor;
    }

    @MarkProperty
    public int getNumberOfCars() {
        return numberOfCars;
    }

    @MarkSocket(mandatory = true, type = SocketType.SINGLETON, name = "speed-provider")
    public CarSpeedProvider getSpeedProvider() {
        return speedProvider;
    }

    public void setCarColor(List<String> carColor) {
        this.carColor = carColor;
    }

    public void setNumberOfCars(int numberOfCars) {
        this.numberOfCars = numberOfCars;
    }

    public void setSpeedProvider(CarSpeedProvider speedProvider) {
        this.speedProvider = speedProvider;
    }
}
